package com.yzz.hzraisedust.hzraseidust.util;

import android.app.Activity;
import android.content.Context;
import android.graphics.Point;
import android.util.DisplayMetrics;
import android.view.WindowManager;

/**
 * Created by zhengzhen on 2017/8/20.
 */

public class ScrennUtil {
    public static Point getHeightAndWeight(Activity context){
        //WindowManager.LayoutParams params = window.getAttributes();
        // 获取设备分辨率
        DisplayMetrics dm = new DisplayMetrics();
        context.getWindowManager().getDefaultDisplay().getMetrics(dm);
        int cxScreen = dm.widthPixels;
        int cyScreen = dm.heightPixels;
        return new Point(cxScreen,cyScreen);
    }

}
